| Filename | (eval 163)[/usr/share/perl5/CGI/Compile.pm:12] |
| Statements | Executed 0 statements in 0s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 62µs | 95µs | CGI::Compile::ROOT::home_vagrant_kohaclone_errors_404_2epl::BEGIN@2 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package CGI::Compile::ROOT::home_vagrant_kohaclone_errors_404_2epl;sub {local $CGI::Compile::USE_REAL_EXIT = 0; | ||||
| 2 | 11 | 568µs | # spent 95µs (62+33) within CGI::Compile::ROOT::home_vagrant_kohaclone_errors_404_2epl::BEGIN@2 which was called:
# once (62µs+33µs) by CGI::Compile::_eval at line 2 # spent 232µs making 3 calls to File::pushd::pushd, avg 77µs/call
# spent 169µs making 3 calls to CGI::initialize_globals, avg 56µs/call
# spent 95µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_errors_404_2epl::BEGIN@2
# spent 40µs making 3 calls to CGI::Compile::ROOT::home_vagrant_kohaclone_errors_404_2epl::CORE:open, avg 13µs/call
# spent 33µs making 1 call to warnings::unimport | ||
| 3 | #line 1 /home/vagrant/kohaclone/errors/404.pl | ||||
| 4 | #!/usr/bin/perl | ||||
| 5 | |||||
| 6 | # This file is part of Koha. | ||||
| 7 | # | ||||
| 8 | # Koha is free software; you can redistribute it and/or modify it under the | ||||
| 9 | # terms of the GNU General Public License as published by the Free Software | ||||
| 10 | # Foundation; either version 2 of the License, or (at your option) any later | ||||
| 11 | # version. | ||||
| 12 | # | ||||
| 13 | # Koha is distributed in the hope that it will be useful, but WITHOUT ANY | ||||
| 14 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||||
| 15 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||||
| 16 | # | ||||
| 17 | # You should have received a copy of the GNU General Public License along with | ||||
| 18 | # Koha; if not, write to the Free Software Foundation, Inc., | ||||
| 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
| 20 | |||||
| 21 | |||||
| 22 | use strict; | ||||
| 23 | use warnings; | ||||
| 24 | use CGI qw ( -utf8 ); | ||||
| 25 | use C4::Auth; | ||||
| 26 | use C4::Output; | ||||
| 27 | use C4::Context; | ||||
| 28 | |||||
| 29 | my $query = CGI->new; | ||||
| 30 | my $admin = C4::Context->preference('KohaAdminEmailAddress'); | ||||
| 31 | my ( $template, $loggedinuser, $cookie ) = get_template_and_user( | ||||
| 32 | { | ||||
| 33 | template_name => 'errors/404.tt', | ||||
| 34 | query => $query, | ||||
| 35 | type => 'intranet', | ||||
| 36 | authnotrequired => 1, | ||||
| 37 | debug => 1, | ||||
| 38 | } | ||||
| 39 | ); | ||||
| 40 | $template->param( admin => $admin ); | ||||
| 41 | output_with_http_headers $query, $cookie, $template->output, 'html', '404 Not Found'; | ||||
| 42 | |||||
| 43 | }; | ||||
| 44 | my $self = shift; | ||||
| 45 | my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv))); | ||||
| 46 | if ($@) { | ||||
| 47 | die $@ unless ( | ||||
| 48 | ref($@) eq 'ARRAY' and | ||||
| 49 | $@->[0] eq "EXIT\n" | ||||
| 50 | ); | ||||
| 51 | my $exit_param = unpack('C', pack('C', sprintf('%.0f', $@->[1]))); | ||||
| 52 | |||||
| 53 | if ($exit_param != 0 && !$CGI::Compile::RETURN_EXIT_VAL && !$self->{return_exit_val}) { | ||||
| 54 | die "exited nonzero: $exit_param"; | ||||
| 55 | } | ||||
| 56 | |||||
| 57 | $exit_val = $exit_param; | ||||
| 58 | } | ||||
| 59 | |||||
| 60 | return $exit_val; | ||||
| 61 | }; | ||||
| 62 | ; |